using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace RetailAnalytic.Adhook.PivotTable.Engine
{
    public partial class UcProp : UserControl
    {
        public FrmRep fR;
        public UcProp()
        {
            InitializeComponent();
            SetGuiAppearance();
        }
        private void SetGuiAppearance()
        {
            this.r.Items[0].Appearance.Image = SR.ImagesLibrary.GetImageByName("tablePicture");
            this.r.Items[1].Appearance.Image = SR.ImagesLibrary.GetImageByName("PicTable");
        }
        private void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            switch (e.ChangedItem.Label)
            {
                case "bind": { fR.BindingPvtCS((bool)e.ChangedItem.Value); break; }
                default: { break; }
            }
        }
        private void UcTable_CheckedChanged(object sender, EventArgs e)
        {
            r.Visible = (UcTable.Checked && ucDiag.Checked) ? true : false;
        }
        private void ucDiag_CheckedChanged(object sender, EventArgs e)
        {
            r.Visible = (UcTable.Checked && ucDiag.Checked) ? true : false;
        }
    }
}
